<?php

defined('MOODLE_INTERNAL') || die;

if ($hassiteconfig) 
{
    $ADMIN->add('tools', new admin_externalpage('toolcleanup', get_string('pluginname', 'tool_cleanup'),
            $CFG->wwwroot.'/'.$CFG->admin.'/tool/cleanup/index.php', 'moodle/site:config'));
    
    $settings = new admin_settingpage('toolcleanup_settings', get_string('pluginname_settings', 'tool_cleanup'));
    
    //Disable managelearnignspace plugin
    $name = 'tool_cleanup_is_cron';
    $title = "Set cron";
    $description = "Set cron support";
    $default = 0;
    $setting = new admin_setting_configcheckbox($name, $title, $description, $default);
    $settings->add($setting);
    
    $name = 'tool_cleanup_my_text';
    $title = "Set my text";
    $default = "";
    $description = "My text description";
    $setting = new admin_setting_configtext($name, $title, $description, $default, PARAM_TEXT);
    $settings->add($setting);
    
    $ADMIN->add('tools', $settings);
    /*
    $settings->add(new admin_setting_configcheckbox('tool_cleanup_is_cron', get_string('switch_on_cron', 'tool_cleanup'),
            get_string('switch_on_cron_text', 'tool_cleanup'), 0));
    */    
}

